package test2;

public class demo100 {
/*二叉搜索树中的第k小的元素
    class Solution {
        int res, k;
        void dfs(TreeNode root) {
            if (root == null) return;
            dfs(root.left);
            if (k == 0) return;
            if (--k == 0) res = root.val;
            dfs(root.right);
        }
        public int kthSmallest(TreeNode root, int k) {
            this.k = k;
            dfs(root);
            return res;
        }
    }
*/

}
